using ValidationFramework;

namespace QSBusinessLayerCSharp
{
	public class Address : NotifyValidatableBase
	{

		#region Fields


		private string addressLine1;
		private string addressLine2;
		const string Addressline1Member = "AddressLine1";
		const string Addressline2Member = "AddressLine2";


		#endregion


		#region Constructor

		public Address()
		{
			PropertyValidationManager.ValidateAll();
		}


		#endregion

		#region Properties

		[RequiredStringRule]
		public string AddressLine1
		{
			get
			{
				return addressLine1;
			}
			set
			{
				if (value != addressLine1)
				{
					addressLine1 = value;
					NotifyAndValidate(Addressline1Member);
				}
			}
		}

		[RequiredStringRule]
		public string AddressLine2
		{
			get
			{
				return addressLine2;
			}
			set
			{
				if (value != addressLine2)
				{
					addressLine2 = value;
					NotifyAndValidate(Addressline2Member);
				}
			}
		}

		#endregion

	}
}